package com.company.behavioral.strategy_pattern.conctete_strategy;

import com.company.behavioral.strategy_pattern.strategy.Discount;

/**
 * 学生票折扣类
 * @ClassName ChildrenDiscount
 * @Author tiezheng.han
 * @Date 2020/9/7 15:39
 **/
public class StudentDiscount implements Discount {

    private final double DISCOUNT = 0.8;

    @Override
    public double calculate(double price) {
        System.out.println("学生票：");
        return price * DISCOUNT;
    }
}
